import {axios} from '@/script/axios.js'
// 卡券列表
export function getCardList(data) {
  return axios({
    url: `/wx/index/userCardList`,
    method: 'get',
		data
  })
}

// 卡券详情
export function getCardDetail(id) {
  return axios({
    url: `/wx/user/cardInfo/${id}`,
    method: 'get'
  })
}

// 兑换券详情
export function getDhjCardDetail(id) {
  return axios({
    url: `/wx/index/coinCertificateInfo/${id}`,
    method: 'get'
  })
}

// 我已兑换
export function actionDhj(id) {
  return axios({
    url: `/wx/index/conversion/${id}`,
    method: 'post'
  })
}


// 兑换卡券
export function coinCertificate(data) {
  return axios({
    url: `/wx/user/coinCertificate`,
    method: 'post',
		data
  })
}


// 退款订单详情
export function refundOrderInfo(orderId) {
  return axios({
    url: `/wx/index/refundOrderInfo/${orderId}`,
    method: 'get'
  })
}

// 退款
export function cardRefund(orderNumber) {
  return axios({
    url: `/wx/index/cardRefund/${orderNumber}`,
    method: 'post'
  })
}